﻿<UserControl x:Class="Anagramme.Views.JoinGameView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             mc:Ignorable="d"
             d:DesignHeight="700" d:DesignWidth="400"
             d:DataContext="{d:DesignData Source=/SampleData/JoinGameViewModelSampleData.xaml}" >
    <Grid>
        <StackPanel Margin="12,12,0,0" HorizontalAlignment="Left" VerticalAlignment="Top" >
            <StackPanel Orientation="Horizontal">
                <Button Style="{DynamicResource ResourceKey=BackButton}" 
                        Command="{Binding Path=GoBackCommand, Mode=OneTime}" />
                <TextBlock Margin="5,0,0,0" 
                           Text="{Binding Path=JoinGame.TITLE, Source={StaticResource ResourceKey=Resources}}" Style="{DynamicResource Titre}" />
            </StackPanel>
            <StackPanel Margin="0,12,0,0" Orientation="Horizontal" >
                <TextBlock Text="{Binding Path=JoinGame.SERVERIP, Source={StaticResource ResourceKey=Resources}}" VerticalAlignment="Center" Style="{DynamicResource Texte}" />
                <TextBox x:Name="txtIP" Margin="5,0,0,0" Width="150"
                         Text="{Binding Path=ServerIP, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged, NotifyOnValidationError=True, ValidatesOnDataErrors=True, ValidatesOnExceptions=True}" 
                         Style="{DynamicResource TextBox}" />
            </StackPanel>
            <Button Margin="0,5,0,0" HorizontalAlignment="Left"
                    Content="{Binding Path=JoinGame.CONNECT, Source={StaticResource ResourceKey=Resources}}"
                    Command="{Binding Path=ConnectCommand, Mode=OneTime}" Style="{DynamicResource Button}" IsDefault="True" />
        </StackPanel>
    </Grid>
</UserControl>
